package com.weaver.openapi.service;

import com.weaver.openapi.pojo.grade.params.*;
import com.weaver.openapi.pojo.grade.res.*;
import com.weaver.openapi.util.*;
import java.util.*;
import cn.hutool.http.*;
import com.alibaba.fastjson.*;

public class GradeService
{
    public static GradeResultVo listGradeV2(final GradeVo gradeVo, String host, final Map<String, String> headers) {
        host = HostUtil.beforeRequestCheckHeaders(host, headers, "application/x-www-form-urlencoded");
        final Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("access_token", gradeVo.getAccessToken());
        paramMap.put("gradeId", gradeVo.getGradeId());
        final String resJson = ((HttpRequest)HttpRequest.get(host + "/grade/v2/list").form((Map)paramMap).headerMap((Map)headers, true)).execute().body();
        return (GradeResultVo)JSONObject.parseObject(resJson, (Class)GradeResultVo.class);
    }
}
